package senders;

import com.rabbitmq.client.*;

import java.io.IOException;

public class SimpleSender extends Sender{
    public SimpleSender(Connection connection, String queueName, boolean persistence, String exchangeName, String exchangeType, String routingKey) throws IOException {
        super(connection, queueName, persistence, exchangeName, exchangeType, routingKey);
    }

    @Override
    public void send(String s) throws IOException {
        channel.queueDeclare(queueName, persistence,false,false,null);
        channel.basicPublish("", queueName,null, s.getBytes());
    }
}
